package com.br.fiscalizacao.domain;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(table = "requisicao", finders = { "findRequisicaosByNum_requisicaoEquals", "findRequisicaosByNum_documentoEquals", "findRequisicaosByData_requisicaoBetween", "findRequisicaosByAssuntoLike", "findRequisicaosByOrgao_responsavel", "findRequisicaosByInteressadoLike", "findRequisicaosByEstado_uf", "findRequisicaosByNome_municipio", "findRequisicaosBySituacaoRequisicao", "findRequisicaosBySituacao_documento", "findRequisicaosByTipo_documento", "findRequisicaosByTipo_requisicao", "findRequisicaosBySituacaoRequisicaoOrNome_municipio" })
public class Requisicao extends AbstractRequisicaoDoc {

    @OneToMany(cascade = CascadeType.ALL)
    private Set<Documento> documentos = new HashSet<Documento>();

    @ManyToOne
    private OrgaoResponsavel orgao_responsavel;

    @ManyToOne
    private Municipio nome_municipio;

    @ManyToOne
    private Estado estado_uf;

    @ManyToOne
    private OrgaoResponsavel orgao_endereco;

    @ManyToOne
    private OrgaoResponsavel orgao_logradouro;
}
